package v1beta1

import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

type NatGatewayStatusType string

const (
	NatGatewayStatusReady    NatGatewayStatusType = "Ready"
	NatGatewayStatusFailed   NatGatewayStatusType = "Failed"
	NatGatewayStatusCreating NatGatewayStatusType = "Creating"
)

// NatGatewaySpec defines the desired state of nat gateway.
type NatGatewaySpec struct {
	//+optional
	OwnerId string `json:"ownerId,omitempty"`
	// provider secret
	ProviderRef ProviderRef `json:"providerRef,omitempty"`
	// nat gateway vpc references
	VPCRef VPCRef `json:"vpcRef,omitempty"`
	//+optional
	NatGatewayId string `json:"natGatewayId,omitempty"`
	//nat网关名
	//+optional
	NatGatewayName string `json:"natGatewayName,omitempty"`
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=natgw
// +kubebuilder:subresource:status

// AttachVolume is the Schema for the c API
type NatGateway struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              NatGatewaySpec `json:"spec,omitempty"`
	// status of NatGateway
	Status NatGatewayStatus `json:"status,omitempty"`
}

type NatGatewayStatus struct {
	Status       NatGatewayStatusType `json:"status,omitempty"`
	NatGatewayId string               `json:"natGatewayId,omitempty"`
	//nat网关名
	//+optional
	NatGatewayName string `json:"natGatewayName,omitempty"`
	//+optional
	SnatRuleIds []string `json:"snatRuleIds,omitempty"`
	//+optional
	DnatRuleIds []string `json:"dnatRuleIds,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// NatGatewayList contains a list of NatGateway item
type NatGatewayList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NatGateway `json:"items"`
}
